package com.xoms.front.persist.impl;

import org.springframework.stereotype.Repository;

import com.xoms.front.model.AccountBean;
import com.xoms.front.persist.dao.AccountDao;

@Repository
public class AccountImpl extends BaseImpl implements AccountDao {
	
	final String NAME_SPACE = NAME_SPACE_HEADER + ".AccountMapper";

	@Override
	public AccountBean selectOneByPhone(String phoneNum) {
		return sqlSessionTemplate.selectOne(NAME_SPACE + ".selectOneByPhone", phoneNum);
	}

	@Override
	public AccountBean selectOneByAccid(String accid) {
		return sqlSessionTemplate.selectOne(NAME_SPACE + ".selectOneById", accid);
	}
	
	@Override
	public int updateLastLoginTime(String accid) {
		return sqlSessionTemplate.update(NAME_SPACE + ".updateLastLoginTime", accid);
	}

	@Override
	public int updatePwd(AccountBean temp) {
		return sqlSessionTemplate.update(NAME_SPACE + ".updatePwd", temp);
	}

}
